package com.zg.message.sys;

import com.zg.common.core.enm.BaseEnumerator;

/**
 * <p>Description: </p>
 *
 * @author zhanfeng.liang
 * @since 2025/5/21 17:15
 */

public enum MsgTypeEnum implements BaseEnumerator {

    SMS("sms", "短信"),
    EMAIL("email", "邮件"),
    INBOX("inbox", "站内信"),
    MH("mh", "门户");

    private final String value;
    private final String label;

    MsgTypeEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public String getValue() {
        return value;
    }

    public static String getByValue(String value) {
        for (MsgTypeEnum type : MsgTypeEnum.values()) {
            if (type.getValue().equals(value)) {
                return type.getLabel();
            }
        }
        return "";
    }
}
